#ifndef MANAGEALERT_H
#define MANAGEALERT_H

#include <QDialog>
#include <QDebug>
#include "ui_managealert.h"
#include <string>
#include <QDateTime>
#include "addalert.h"
#include "alertlist.h"
#include "alertinfo.h"

using namespace std;
class ManageAlert : public QDialog, public Ui::ManageAlert
{
    Q_OBJECT
private:
    AlertList alertList;
public:
    ManageAlert();
    AddAlert *addAlert;
    AlertInfo *alertInfo;
    Alert searchAlerts(string);
    void reloadAlertList();
    void setAlertList(AlertList alertList);
signals:
    void sendAlert(Alert);
    void deleteAlert(Alert);
    void modifyAlert(Alert, Alert);
    void updateAlertList(AlertList);
    void close();
public slots:
    void on_manageAlertAddButton_clicked();
    void on_manageAlertCloseButton_clicked();
    void enableWindow();
    void receiveDelete(Alert);
    void receiveAdd(Alert);
    void receiveModify(Alert,Alert);
    void openAlertInfo(QListWidgetItem *);
};

#endif // MANAGEALERT_H
